﻿@model TaskManager_WCG.Models.Task

@{
    ViewBag.Title = "修改任务";
}

<h2>修改任务</h2>

@using (Html.BeginForm())
{
@Html.AntiForgeryToken()

                <div class="form-horizontal">
                    @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                    @Html.HiddenFor(model => model.TaskID)

                    <div class="form-group">
                        @Html.LabelFor(model => model.TaskPriority, htmlAttributes: new { @class = "control-label col-md-2" })
                        <div class="col-md-10">
                            <label class="radio-inline">
                                <input type="radio" value="1" name="TaskPriority" checked="@(Model.TaskPriority==1)" />高
                            </label>
                            <label class="radio-inline">
                                <input type="radio" value="2" name="TaskPriority" checked="@(Model.TaskPriority==2)" />中
                            </label>
                            <label class="radio-inline">
                                <input type="radio" value="3" name="TaskPriority" checked="@(Model.TaskPriority==3)" />低
                            </label>
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.Content, htmlAttributes: new { @class = "control-label col-md-2" })
                        <div class="col-md-10">
                            @Html.EditorFor(model => model.Content, new { htmlAttributes = new { @class = "form-control" } })
                            @Html.ValidationMessageFor(model => model.Content, "", new { @class = "text-danger" })
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.TaskState, htmlAttributes: new { @class = "control-label col-md-2" })
                        <div class="col-md-10">
                            <label class="radio-inline">
                                <input type="radio" value="1" name="TaskState" checked="@(Model.TaskState==1)" />未完成
                            </label>
                            <label class="radio-inline">
                                <input type="radio" value="2" name="TaskState" checked="@(Model.TaskState==2)" />已完成
                            </label>
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.FinishedTime, htmlAttributes: new { @class = "control-label col-md-2" })
                        <div class="col-md-10">
                            @Html.EditorFor(model => model.FinishedTime, new { htmlAttributes = new { @class = "form-control" } })
                            @Html.ValidationMessageFor(model => model.FinishedTime, "", new { @class = "text-danger" })
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.uid, htmlAttributes: new { @class = "control-label col-md-2" })
                        <div class="col-md-10">
                            @Html.DropDownList("uid", null, new { @class = "form-control" })
                            @Html.ValidationMessageFor(model => model.uid, "", new { @class = "text-danger" })
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-md-offset-2 col-md-10">
                            <input type="submit" value="修改" class="btn btn-primary" />
                            @Html.ActionLink("返回列表", "Index", null, new { @class = "btn btn-primary" })
                        </div>
                    </div>
                </div>}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
